cmake_minimum_required(VERSION 2.8)
project(tcp_client)

set(CMAKE_CXX_STANDARD 11)

include_directories(.)
set(SOURCE_FILES
        muduo/base/Atomic.h
        muduo/base/BlockingQueue.h
        muduo/base/BoundedBlockingQueue.h
        muduo/base/Condition.cc
        muduo/base/Condition.h
        muduo/base/copyable.h
        muduo/base/CurrentThread.h
        muduo/base/Date.cc
        muduo/base/Date.h
        muduo/base/Exception.cc
        muduo/base/Exception.h
        muduo/base/Logging.cc
        muduo/base/Logging.h
        muduo/base/LogStream.cc
        muduo/base/LogStream.h
        muduo/base/Mutex.h
        muduo/base/noncopyable.h
        muduo/base/Singleton.h
        muduo/base/StringPiece.h
        muduo/base/Thread.cc
        muduo/base/Thread.h
        muduo/base/Timestamp.cc
        muduo/base/Timestamp.h
        muduo/base/TimeZone.cc
        muduo/base/TimeZone.h
        muduo/base/Types.h
        muduo/base/WeakCallback.h
        muduo/net/poller/DefaultPoller.cc
        muduo/net/poller/EPollPoller.cc
        muduo/net/poller/EPollPoller.h
        muduo/net/poller/PollPoller.cc
        muduo/net/poller/PollPoller.h
        muduo/net/Buffer.cc
        muduo/net/Buffer.h
        muduo/net/Callbacks.h
        muduo/net/Channel.cc
        muduo/net/Channel.h
        muduo/net/Connector.cc
        muduo/net/Connector.h
        muduo/net/Endian.h
        muduo/net/EventLoop.cc
        muduo/net/EventLoop.h
        muduo/net/InetAddress.cc
        muduo/net/InetAddress.h
        muduo/net/Poller.cc
        muduo/net/Poller.h
        muduo/net/Socket.cc
        muduo/net/Socket.h
        muduo/net/SocketsOps.cc
        muduo/net/SocketsOps.h
        muduo/net/TcpClient.cc
        muduo/net/TcpClient.h
        muduo/net/TcpConnection.cc
        muduo/net/TcpConnection.h
        muduo/net/Timer.cc
        muduo/net/Timer.h
        muduo/net/TimerId.h
        muduo/net/TimerQueue.cc
        muduo/net/TimerQueue.h
        test_tcp_client.cpp tcp_client.cpp tcp_client.h)
find_package (Threads)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_executable(tcp_client ${SOURCE_FILES})
target_link_libraries(tcp_client ${CMAKE_THREAD_LIBS_INIT})